/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txcms.admin.action;

import cn.txdnet.txcms.service.InfotagsService;
import cn.txdnet.txweb.model.ModelUtil;
import cn.txdnet.txweb.model.ModelView;
import cn.txdnet.txweb.utils.WebUtil;
import java.util.Collections;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author txdnet
 */
public class InfotagsAction {
    
    /**
     * 查询info关联的tag信息
     * @param req
     * @return
     * @throws Exception 
     */
    public ModelView query_list(HttpServletRequest req) throws Exception {
        long infoid = WebUtil.getLong(req, "infoid", -1);
        if(infoid<0){
            return ModelUtil.getJsonModel(Collections.emptyList());
        }
        return ModelUtil.getJsonModel(InfotagsService.queryList(infoid));
    }
    
}
